<html>
<head>
    <meta charset="UTF-8">
    <title>论坛主页</title>
    <script src="/forum/public/static/js/jquery1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
        var load_user="{$Request.session.user}";
        $(document).ready(function () {
            $.post("/forum/index.php/section/index",function (data) {
                $.each(data,function (){
                    $("#column tbody").append("<tr><td height='60px'></td><td><a href='/forum/index.php/thread/thread.html?mid="+this.id+"'><font color='red'>"+this.name+"</font></a><br>"+this.description+"</td><td></td></tr>");
                });
            },"json");
            if (load_user!==""){
                var content="<font style='color: white'>论坛列表&nbsp;&nbsp;&nbsp;欢迎："+load_user+"，"+"<a href='/forum/index.php/user/logout'>注销</a></font>";
                $("#ld").html(content);
            }
        });
    </script>
</head>
<body>
<table width="60%" border="1" align="center" cellspacing="0" id="column">
    <thead>
    <tr>
        <td colspan="3" style="background: #B10707"><font color="white">
            <div id="ld">
            论坛列表&nbsp;&nbsp;&nbsp;<a href="add_forum.html" target="_blank"><font color="white" style="display: none">(添加版块)</font></a></font>
            <a href="/forum/index.php/user/login.html" id="login">登录</a>
            <a href="/forum/index.php/user/register.html" id="register">注册</a>
            </div>
        </td>
    </tr>
    <tr>
        <td width="10%" style="background: #FDF7AF" align="center">状态</td>
        <td width="70%" style="background: #FDF7AF" align="center"> 论坛</td>
        <td width="20%" style="background: #FDF7AF" align="center">最后更新</td>
    </tr>
    </thead>
    <tbody>

    </tbody>
</table>
</body>
</html>